var util = require("../../../utils/util.js");
var api = require('../../../config/api.js');
Page({
  data: {
    inputShowed: false,
    inputVal: "",//search value
    products: [],
    param: {},
    page: 1,
    endFlag: false,
    loadingFlag: false,
    activeCategoryId: 0,
    navbar_bgcolor: wx.getStorageSync('navbar_bgcolor'),
    activeTabId: 1,
    redList: [],
    blackList: []
  },
  onLoad: function (cate) {
    this.loadData();
  },
  loadData: function () {
    var that = this;
    util.request(api.ExampleCoach, {}).then(function (res) {
      if (res.errno === 0) {
        that.setData({
          redList: res.data.redList,
          blackList: res.data.blackList
        });
      }
    });
  },

  tabClick: function (e) {
    this.setData({
      activeTabId: e.currentTarget.id
    });
  },
  onReachBottom: function () {

  },

  //事件处理函数
  bindViewTap: function (e) {

  }
})